<template>
  <div>
    <el-dialog :visible.sync="dialogVisible" :before-close="handleClose" title="代理商信息" width="50%">
      <el-tab-pane label="操作日志">
        <eltable :table-label="tableLabel" :table-data="tableData"/>
      </el-tab-pane>
    </el-dialog>
  </div>
</template>

<script>
import Eltable from '@/components/Eltable'
export default {
  components: {
    Eltable
  },
  props: {
    data: {
      type: Object,
      default() {
        return {}
      }
    }
  },
  data() {
    return {
      tableLabel: [
        {
          label: '日志信息', prop: 'logMessage', width: '10'
        },
        {
          label: '操作人', prop: 'creator', width: '10'
        },
        {
          label: 'IP', prop: 'ip', width: '10'
        },
        {
          label: '操作时间', prop: 'createTimeStr', width: '10'
        }
      ]
    }
  },
  computed: {
    dialogVisible() { return this.data.dialog },
    tableData() {
      return this.data.tableData
    }
  },
  created() {
  },
  methods: {
    handleClose() {
      this.$emit('viewClosed')
    }
  }
}
</script>

<style lang="scss" scoped>
.account {
  padding: 0 10px;
  .el-col {
    margin: 14px 5px;
  }
}
</style>
